package com.kwshare.common.api;

import com.kwshare.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件服务
 *
 * @author yangjing
 */
@Component
@FeignClient(value = ServiceNameConstants.FILE_SERVICE)
public interface RemoteFileService {

    /**
     * 文件上传
     *
     * @param file 文件
     * @return 结果
     */
    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String upload(MultipartFile file);
}
